<?php

/*********************************************************************************/
/* CNB Your Account: An Advanced User Management System for phpnuke     		*/
/* ============================================                         		*/
/*                                                                      		*/
/* Copyright (c) 2004 by Comunidade PHP Nuke Brasil                     		*/
/* http://dev.phpnuke.org.br & http://www.phpnuke.org.br                		*/
/*                                                                      		*/
/* Contact author: escudero@phpnuke.org.br                              		*/
/* International Support Forum: http://ravenphpscripts.com/forum76.html 		*/
/*                                                                      		*/
/* This program is free software. You can redistribute it and/or modify 		*/
/* it under the terms of the GNU General Public License as published by 		*/
/* the Free Software Foundation; either version 2 of the License.       		*/
/* Profile mod by White_Devil http://devil-mods.us                      		*/
/*********************************************************************************/
/* CNB Your Account it the official successor of NSN Your Account by Bob Marion	*/
/*********************************************************************************/

if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
    header("Location: ../../../index.php");
    die ();
}
if (!defined('CNBYA')) { echo "CNBYA protection"; exit; }
$resultbc = $db->sql_query("SELECT * FROM ".$prefix."_bbconfig");
while($rowbc = $db->sql_fetchrow($resultbc)) {
    $board_config[$rowbc[config_name]] = $rowbc[config_value];
}
$result  = $db->sql_query("SELECT * FROM ".$user_prefix."_users WHERE username='$username'");
$num     = $db->sql_numrows($result);
$usrinfo = $db->sql_fetchrow($result);

$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
while ($sqlvalue = $db->sql_fetchrow($result)) {
  list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$usrinfo[user_id]'"));
  $usrinfo[$sqlvalue[name]] = $value;
}

if(!$bypass) cookiedecode($user);
include("header.php");

if ($num > 0) {
    if ($usrinfo[user_level] > 0) {
        OpenTable();
        echo "<center>";
        if ((strtolower($usrinfo['username']) == strtolower($cookie[1])) AND ($usrinfo['user_password'] == $cookie[2])) {
            echo "<font class=\"option\">$username, "._WELCOMETO." $sitename!</font><br><br>";
            echo "<font class=\"content\">"._THISISYOURPAGE."</font></center><br>";
            nav(1);
            echo "<br>";
        } else {
            echo "<font class=\"title\">"._PERSONALINFO.": ".$usrinfo['username']."</font></center><br>";
        }
        if($num == 1) {
            echo "<center>\n";
          echo "<table bgcolor='$bgcolor4' border='0' cellpadding='2' cellspacing='1' class='content' width='60%'>\n";
  //          echo "<tr>\n<td align='center' bgcolor='$bgcolor2' class='title' colspan='2' width='100%'>";
            if ($usrinfo[user_avatar_type] == 1) {		// Type 1
                $user_avatar = $board_config[avatar_path]."/".$usrinfo[user_avatar];
            } elseif($usrinfo[user_avatar_type] == 2) {	// Type 2
  //              echo "<img src='$usrinfo[user_avatar]'>";
            } elseif($usrinfo[user_avatar] == "") {		// Type 3
  //              echo "<img src='".$board_config[avatar_gallery_path]."/gallery/blank.gif'>";
            } else {
  //              echo "<img src='".$board_config[avatar_gallery_path]."/".$usrinfo[user_avatar]."'>";
            }
            echo "</td>\n</tr>\n";
            $usrinfo[user_website] = strtolower($usrinfo[user_website]);
            $usrinfo[user_website] = str_replace("http://", "", $usrinfo[user_website]);
            if ($usrinfo[user_website] == "") {
                $userwebsite = _YA_NA;
            } else {
                $userwebsite = "<a href=\"http://$usrinfo[user_website]\" target=\"new\">$usrinfo[user_website]</a>";
            }
            if (is_admin($admin) || $usrinfo['user_viewemail'] == 1) {
                $user_email = "<a href='mailto:$usrinfo[user_email]'>$usrinfo[user_email]</a>";
            } else {
                $user_email = _YA_NA;
            }
            $usrinfo[user_sig] = nl2br($usrinfo[user_sig]);
            $usrinfo[user_bio] = nl2br($usrinfo[user_bio]);
            $usrinfo[user_lastvisit] = date("D M j H:i:s T Y", $usrinfo[user_lastvisit]);
  //          echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._USERNAME."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[username]</b></td>\n</tr>\n";
  //          echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._REALNAME."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[name]</b></td>\n</tr>\n";
  //          echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._EMAIL."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$user_email</b></td>\n</tr>\n";
  //          echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._WEBSITE."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$userwebsite</b></td>\n</tr>\n";

		if(is_admin($admin) OR is_user($user) AND $usrinfo[username] == $username) {
                    $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' ORDER BY pos");
		} else {
			$result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field WHERE need <> '0' AND public='1' ORDER BY pos");
		}
		while ($sqlvalue = $db->sql_fetchrow($result)) {
			if (substr($sqlvalue[name],0,1)=='_') eval( "\$name_exit = $sqlvalue[name];"); else $name_exit = $sqlvalue[name];
//			echo "<tr><td width='30%' bgcolor='$bgcolor1'>$name_exit</td><td width='70%' bgcolor='$bgcolor1'>".$usrinfo[$sqlvalue[name]]."</td></tr>\n";
		}

/*            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._ICQ."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_icq]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._AIM."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_aim]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._YIM."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_yim]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._MSNM."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_msnm]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._LOCATION."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_from]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._REGDATE."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_regdate]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._OCCUPATION."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_occ]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._INTERESTS."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_interests]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._SIGNATURE."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_sig]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._EXTRAINFO."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[bio]</b></td>\n</tr>\n";
            echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._YA_LASTVISIT."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[user_lastvisit]</b></td>\n</tr>\n";
  */          $sql2 = "SELECT uname FROM ".$prefix."_session WHERE uname='$username'";
            $result2 = $db->sql_query($sql2);
            $row2 = $db->sql_fetchrow($result2);
            $username_pm = $username;
            $active_username = $row2[uname]; // Edited PSL 12-9-04 was killing $username
            if ($active_username == "") { $online = _OFFLINE; } else { $online = _ONLINE; }
  //          echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._USERSTATUS."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$online</b></td>\n</tr>\n";
            if ($Version_Num > 6.9) {
                if (is_user($user) AND $cookie[1] == "$username" OR is_admin($admin)) {
  //                  echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._YA_POINTS."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>$usrinfo[points]</b></td>\n</tr>\n";
                }
            }
            if (($usrinfo[newsletter] == 1) AND ($username == $cookie[1]) AND ($usrinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($usrinfo[newsletter] == 1))) {
  //              echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._NEWSLETTER."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>"._SUBSCRIBED."</b></td>\n</tr>\n";
            } elseif (($usrinfo[newsletter] == 0) AND ($username == $cookie[1]) AND ($usrinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($usrinfo[newsletter] == 0))) {
 //               echo "<tr>\n<td width='30%' bgcolor='$bgcolor1'>"._NEWSLETTER."</td>\n<td width='70%' bgcolor='$bgcolor1'><b>"._NOTSUBSCRIBED."</b></td>\n</tr>\n";
            }
            echo "</table>\n";
            echo "</center><br>\n<center>\n";
            if (is_active("Journal") AND $cookie[1] != $username) {
                $sql3 = "SELECT jid FROM ".$prefix."_journal WHERE aid='$username' AND status='yes' ORDER BY pdate,jid DESC LIMIT 0,1";
                $result3 = $db->sql_query($sq3);
                $row3 = $db->sql_fetchrow($result3);
                $jid = $row3[jid];
                if ($jid != "" AND isset($jid)) {
//                    echo "[ <a href=\"modules.php?name=Journal&file=search&bywhat=aid&forwhat=$username\">"._READMYJOURNAL."</a> ]<br>";
                }
            }


//Start Devil Modz new user profile view
opentable();
$ThemeSel = get_theme();

if (file_exists('themes/'.$ThemeSel.'/forums/forums.css')) {
?>
<link rel="stylesheet" type="text/css" href="themes/<? echo "$ThemeSel"; ?>/forums/forums.css"/>
<?

} else if (file_exists('themes/'.$ThemeSel.'/style/style.css')) {

?>
<link rel="stylesheet" type="text/css" href="themes/<? echo "$ThemeSel"; ?>/style/style.css"/>
<?



} else {
?>
<link rel="stylesheet" type="text/css" href="modules/Forums/templates/subSilver/subSilver.css"/>
<?

}




$sql1 = "SELECT * FROM ".$prefix."_bbranks ORDER BY rank_special, rank_min";
if ( !($result1 = $db->sql_query($sql1)) ) {
echo "System Error getting ranks!!!";
die;
}
$ranksrow = array();
while ( $row1 = $db->sql_fetchrow($result1) ) {
	$ranksrow[] = $row1;
}
$db->sql_freeresult($result1);


$poster_rank = '';
$rank_image = '';
if ( $usrinfo['user_rank'] ) {
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $usrinfo['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
} else {
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $usrinfo['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
}
echo "

<table class='forumline' width='100%' cellspacing='1' cellpadding='3' border='0' align='center'>
  <tr>
	<th class='thHead' colspan='2' height='25' nowrap='nowrap'>Güncel Bilgiler :: $username</th>
  </tr>
  <tr>
	<td class='catLeft' width='40%' height='28' align='center'><b><span class='gen'>Avatar</span></b></td>
	<td class='catRight' width='60%'><b><span class='gen'>$username : Güncel Bilgileri</span></b></td>
  </tr>
  <tr>
	<td class='row1' height='6' valign='top' align='center'>";

	            if ($usrinfo[user_avatar_type] == 1) {		// Type 1
                $user_avatar = $board_config[avatar_path]."/".$usrinfo[user_avatar];
            } elseif($usrinfo[user_avatar_type] == 2) {	// Type 2
                echo "<img src='$usrinfo[user_avatar]'>";
            } elseif($usrinfo[user_avatar] == "") {		// Type 3
                echo "<img src='".$board_config[avatar_gallery_path]."/gallery/blank.gif'>";
            } else {
                echo "<img src='".$board_config[avatar_gallery_path]."/".$usrinfo[user_avatar]."'>";
            }


$stoffline = '<img src=\modules/Forums/images/user_offline.gif align=\"absmiddle\">';
$stonline = '<img src=\modules/Forums/images/user_online.gif align=\"absmiddle\">';

		            $active_username = $row2[uname]; // Edited PSL 12-9-04 was killing $username
            if ($active_username == "") { $online = "$stoffline"; } else { $online = "$stonline"; }

	echo "<br /><span class='postdetails'>$poster_rank<br>$rank_image</span></td>
	<td class='row1' rowspan='3' valign='top'><table width='100%' border='0' cellspacing='1' cellpadding='3'>
			<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Kullanıcı Durumu :&nbsp;</span></td>
		  <td width='100%'><b><span class='gen'>$online</span></b></td>
		</tr>
		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>İsim :&nbsp;</span></td>
		  <td width='100%'><b><span class='gen'>$usrinfo[name]</span></b></td>
		</tr>
		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Son Ziyaret :&nbsp;</span></td>
		  <td width='100%'><b><span class='gen'>$usrinfo[user_lastvisit]</span></b></td>
		</tr>



		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Kayıt Tarihi :&nbsp;</span></td>
		  <td width='100%'><b><span class='gen'>$usrinfo[user_regdate]</span></b></td>
		</tr>
		<tr>";



$nukedate = strtotime($regdate);

$totalpost1 = $usrinfo['user_posts'];


$memberdays = max(1, round( ( time() - $nukedate ) / 86400 ));
$posts_per_day = $usrinfo['user_posts'] / $memberdays;

echo "
		  <td valign='top' align='right' nowrap='nowrap'><span class='gen'>Toplam Mesaj :&nbsp;</span></td>
		  <td valign='top'><b><span class='gen'>$totalpost1</span></b><br /><span class='genmed'><a href='modules.php?name=Forums&file=search&search_author=$username' class='genmed'>$username Tüm Mesajlarını Bul</a></span></td>



		</tr>
		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Yaşadığı Yer :&nbsp;</span></td>
		  <td><b><span class='gen'>".$usrinfo['user_from']."</span></b></td>
		</tr>
		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Web Sitesi :&nbsp;</span></td>
		  <td><span class='gen'><b>";

if (( $usrinfo['user-website'] == "http:///") || ( $usrinfo['user_website'] == "http://")){
    $usrinfo['user_website'] =  "";
}
if (($usrinfo['user_website'] != "" ) && (substr($usrinfo['user_website'],0, 7) != "http://")) {
    $usrinfo['user_website'] = "http://".$usrinfo['user_website'];
}


if (file_exists('themes/'.$ThemeSel.'/forums/images/lang_english/icon_www.gif')) {
$wwwicon = "themes/$ThemeSel/forums/images/lang_english/icon_www.gif";
} else {
$wwwicon = "modules/Forums/templates/subSilver/images/lang_english/icon_www.gif";
}
$www_img = ( $usrinfo['user_website'] ) ? '<a href="' . $usrinfo['user_website'] . '" target="_blank"><img src="'.$wwwicon.'" alt="Visit Website" title="WebSite Ziyaret Edin" border="0" /></a>' : '&nbsp;';
$www = ( $usrinfo['user_website'] ) ? '<a href="' . $usrinfo['user_website'] . '" target="_blank">' . $usrinfo['user_website'] . '</a>' : '&nbsp;';
if ($www == "") {
echo "Bilgi Girilmemiş";
} else {
if ($wwwicon != "") {
echo $www_img;
} else {
echo "$www";
}
}
		  echo "</b></span></td>
		</tr>
		<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Mesleği :&nbsp;</span></td>
		  <td><b><span class='gen'>".$usrinfo['user_occ']."</span></b></td>
		</tr>
		<tr>
		  <td valign='top' align='right' nowrap='nowrap'><span class='gen'>İlgi Alanları :</span></td>
		  <td> <b><span class='gen'>".$usrinfo['user_interests']."</span></b></td>
		</tr>
		";


		            if (($usrinfo[newsletter] == 1) AND ($username == $cookie[1]) AND ($usrinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($usrinfo[newsletter] == 1))) {

echo "
		<tr>
		  <td valign='top' align='right' nowrap='nowrap'><span class='gen'>Haber Bülteni :</span></td>
		  <td> <b><span class='gen'>Abone</span></b></td>
		</tr>
";


            } elseif (($usrinfo[newsletter] == 0) AND ($username == $cookie[1]) AND ($usrinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($usrinfo[newsletter] == 0))) {

echo "
		<tr>
		  <td valign='top' align='right' nowrap='nowrap'><span class='gen'>Haber Bülteni :</span></td>
		  <td> <b><span class='gen'>Aboneliği Yok</span></b></td>
		</tr>
";

            }








		echo "

				<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Puan :&nbsp;</span></td>
		  <td><b><span class='gen'>".$usrinfo['points']."</span></b></td>
		</tr>";

            $sql3 = "SELECT name FROM ".$prefix."_groups WHERE points < ".$usrinfo['points']."";
            $result3 = $db->sql_query($sql3);
            $row3 = $db->sql_fetchrow($result3);

            if ($row3[name] == "") {
			            $groupname = "Grup Üyeliği Yok";
			} else {
            $groupname = $row3[name];
			}







echo "
				<tr>
		  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>Grup :&nbsp;</span></td>
		  <td><b><span class='gen'>".$groupname."</span></b></td>
		</tr>


  </table>
	</td>
  </tr>
  <tr>
	<td class='catLeft' align='center' height='28'><b><span class='gen'>İletişim $username </span></b></td>
  </tr>
  <tr>
	<td class='row1' valign='top'><table width='100%' border='0' cellspacing='1' cellpadding='3'>
		<tr>";
if (file_exists('themes/'.$ThemeSel.'/forums/images/lang_english/icon_email.gif')) {
$emailicon = "themes/$ThemeSel/forums/images/lang_english/icon_email.gif";
} else {
$emailicon = "modules/Forums/templates/subSilver/images/lang_english/icon_email.gif";
}
$email_img = ( $usrinfo['user_email'] ) ? '<a href="mailto:' . $usrinfo['user_email'] . '" target="_blank"><img src="'.$emailicon.'" alt="Email User" title="Kullanıcıya Email Gönder" border="0" /></a>' : '&nbsp;';
$email = ( $usrinfo['user_email'] ) ? '<a href="mailto:' . $usrinfo['user_email'] . '" target="_blank">' . $usrinfo['user_email'] . '</a>' : '&nbsp;';
if ($email == "") {
$daemail = "Bilgi Girilmemiş";
} else {

if ($usrinfo['user_viewemail'] == "0") {
	if (is_admin($admin)) {
if ($emailicon != "") {
$daemail = $email_img;
} else {
$daemail = $email;
}
	} else {
	$daemail = "Private";
	}
} else {

if ($emailicon != "") {
$daemail = $email_img;
} else {
$daemail = $email;
}
}
}

$userid11 = $usrinfo['user_id'];

//good example
if (file_exists('themes/'.$ThemeSel.'/forums/images/lang_english/icon_pm.gif')) {
$pmicon = "themes/$ThemeSel/forums/images/lang_english/icon_pm.gif";
} else {
$pmicon = "modules/Forums/templates/subSilver/images/lang_english/icon_pm.gif";
}
$pm_img = '<a href="modules.php?name=Private_Messages&file=index&mode=post&u='.$userid11.'" target="_blank"><img src="'.$pmicon.'" alt="P.M. User" title="Kullanıcıya Özel Mesaj Gönder" border="0" /></a>';
$pm = '<a href="modules.php?name=Private_Messages&file=index&mode=post&u='.$userid11.'" target="_blank">Private Message User</a>';
if ($pm == "") {
$pmit = "Bilgi Girilmemiş";
} else {
if ($pmicon != "") {
$pmit = $pm_img;
} else {
$pmit = "$pm";
}
}
//end exampole

if (file_exists('themes/'.$ThemeSel.'/forums/images/lang_english/icon_yim.gif')) {
$yimicon = "themes/$ThemeSel/forums/images/lang_english/icon_yim.gif";
} else {
$yimicon = "modules/Forums/templates/subSilver/images/lang_english/icon_yim.gif";
}
$yim_img = '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.$usrinfo['user_yim'].'&.src=pg"><img border=0 src="http://opi.yahoo.com/online?u='.$usrinfo['user_yim'].'&m=g&t=1"></a>';
$yim = '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.$usrinfo['user_yim'].'&.src=pg"><img border=0 src="http://opi.yahoo.com/online?u='.$usrinfo['user_yim'].'&m=g&t=1"></a>';
if ($usrinfo['user_yim'] == "") {
$yimit = "Bilgi Girilmemiş";
} else {
if ($yimicon != "") {
$yimit = $yim_img;
} else {
$yimit = "$yim";
}
}

if ($usrinfo['user_aim'] == "") {
$aimaddy = "Bilgi Girilmemiş";
} else {
$aimaddy = $usrinfo['user_aim'];
}












if ($usrinfo['user_icq'] == "") {
$icqaddy = "Bilgi Girilmemiş";
} else {
$icqaddy = $usrinfo['user_icq'];
}
if ($usrinfo['user_msnm'] == "") {
$msnaddy = "Bilgi Girilmemiş";
} else {
$msnaddy = $usrinfo['user_msnm'];
}

		echo "  <td valign='middle' align='right' nowrap='nowrap'><span class='gen'>E-mail Adresi :</span></td>
		  <td class='row1' valign='middle' width='100%'><b><span class='gen'>".$daemail."</span></b></td>
		</tr>
		<tr>
		  <td valign='middle' nowrap='nowrap' align='right'><span class='gen'>Özel Mesaj :</span></td>
		  <td class='row1' valign='middle'><b><span class='gen'>$pmit</span></b></td>
		</tr>
		<tr>
		  <td valign='middle' nowrap='nowrap' align='right'><span class='gen'>MSN Adresi :</span></td>
		  <td class='row1' valign='middle'><span class='gen'>".$msnaddy."</span></td>
		</tr>
		<tr>
		  <td valign='middle' nowrap='nowrap' align='right'><span class='gen'>Yahoo Adresi :</span></td>
		  <td class='row1' valign='middle'><span class='gen'>".$yimit."</span></td>
		</tr>
		<tr>
		  <td valign='middle' nowrap='nowrap' align='right'><span class='gen'>AIM Adresi :</span></td>
		  <td class='row1' valign='middle'><span class='gen'>".$aimaddy."</span></td>
		</tr>
		<tr>
		  <td valign='middle' nowrap='nowrap' align='right'><span class='gen'>ICQ Numarası :</span></td>
		  <td class='row1' valign='middle'><span class='gen'>".$icqaddy."</span></td>

		</tr>
	  </table>
	</td>
  </tr>

  <tr><td colspan='2' class='row1'>";
include_once("modules/Your_Account/public/wdbbcode.php");
include_once("modules/Your_Account/public/wdtemplate.php");
$user_sig = ( $usrinfo['user_sig'] != '' && $board_config['allow_sig'] ) ? $usrinfo['user_sig'] : '';
$user_sig_bbcode_uid = $usrinfo['user_sig_bbcode_uid'];


        if (file_exists("themes/$ThemeSel/forums/index_body.tpl")) {
                $template_path = "themes/$ThemeSel/";
            $template_name = "forums";
            $template = new Template($template_path . $template_name, $board_config, $db);
        } else {
	$template_path = 'templates/' ;
	$template_name = $row['template_name'] ;
            $template = new Template($phpbb_root_path . $template_path . $template_name, $board_config, $db);
        }





	if ($user_sig != '' && $user_sig_bbcode_uid != '')
	{
echo "<center><strong>|------------------------------ Kullanıcı İmzası ------------------------------|</strong></center>";
		$user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
echo $user_sig;
echo "<center><strong>|---------------------------- Kullanıcı İmzası Sonu ---------------------------|</strong></center>";

}






  echo "</span></td></tr>
  <tr><td colspan='2' class='row1'>";

          $incsdir = dir("modules/$module_name/includes");
        include($incsdir->path."/ui-0privmsgs.php");

 echo " </td></tr>
  <tr><td colspan='2' class='row1' align=right>";

echo "<a href='http://www.60sn.com' target='_blank'><u>60sn.com & Netopsiyon.com</u></a>";

 echo " </td></tr>
</table>



            ";

closetable();

//end new system by White_Devil


            if (is_admin($admin)) {
                if ($userinfo[last_ip] != 0) {
                echo "<center>"._LASTIP." <b>$userinfo[last_ip]</b><br>";
                // echo "[ <a href='".$admin_file.".php?op=ipban&ip=$userinfo[last_ip]'>"._BANTHIS."</a> ]<br>";
echo "[ <a href='".$admin_file.".php?op=ABBlockedIPAdd&tip=".$userinfo['last_ip']."'>"._BANTHIS."</a> | <a href=\"".$admin_file.".php?op=modifyUser&chng_uid=".$userinfo['username']."\">"._EDITUSER."</a> ]</center>";

                }
                echo "[ <a href=\"modules.php?name=$module_name&file=admin&op=modifyUser&chng_uid=$usrinfo[user_id]\">"._EDITUSER."</a> ] ";
                echo "[ <a href=\"modules.php?name=$module_name&file=admin&op=suspendUser&chng_uid=$usrinfo[user_id]\">"._SUSPENDUSER."</a> ] ";
                echo "[ <a href=\"modules.php?name=$module_name&file=admin&op=deleteUser&chng_uid=$usrinfo[user_id]\">"._DELETEUSER."</a> ]<br>";
            }
            if (((is_user($user) AND $cookie[1] != $username) OR is_admin($admin)) AND is_active("Private_Messages")) { echo "<br>[ <a href=\"modules.php?name=Private_Messages&mode=post&u=$usrinfo[user_id]\">"._USENDPRIVATEMSG." $usrinfo[username]</a> ]<br>\n"; }
            echo "</center></font>";
        } else {
            echo "<center>"._NOINFOFOR." $username</center>";
        }
        CloseTable();

        $incsdir = dir("modules/$module_name/includes");
        while($func=$incsdir->read()) {
            if(substr($func, 0, 3) == "ui-") {
                $incslist .= "$func ";
            }
        }
        closedir($incsdir->handle);
        $incslist = explode(" ", $incslist);
        sort($incslist);
        for ($i=0; $i < sizeof($incslist); $i++) {
            if($incslist[$i]!="") {
            	if ($incslist[$i] == "ui-0privmsgs.php") {

            	} else {
                $counter = 0;
                include($incsdir->path."/$incslist[$i]");
                }
            }
        }

    } else {
        OpenTable();
        echo "<center><b>"._NOINFOFOR." <i>".$usrinfo['username']."</i></b></center>";
        if($usrinfo[user_level] == 0) { echo "<br><center><b>"._ACCSUSPENDED."</b></center>"; }
        if($usrinfo[user_level] == -1) { echo "<br><center><b>"._ACCDELETED."</b></center>"; }
        CloseTable();
    }
} else {
    OpenTable();
    echo "<center><b>"._NOINFOFOR." <i>".$usrinfo['username']."</i></b></center>";
    echo "<br><center><b>"._YA_ACCNOFIND."</b></center>";
    CloseTable();
}
include("footer.php");

?>